<?php


namespace App\Http\Requests\Order\Shipment;


use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class PackRequest extends FormRequest
{
    public function rules()
    {
        return [
            'consumable' => ['required', 'in:0,1'],
            'package_id' => ['required', Rule::exists('package', 'id')->whereNot('stock', 0)],
        ];
    }
}